package com.jy.api.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xiaohua on 2018/10/10.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SalesItem {

    private int qty;
    private double amount;
    private String typeId;
    private String typeName;
    private String parentTypeName;

    private String parentTypeId;

    private String name;
    private double salesPrice;

    private double commission;

    private MemberNet net;

    public SalesItem(Object[] ob) {
        this.parentTypeName=ob[0].toString();
        this.name=ob[1].toString();
        this.salesPrice=Double.valueOf( ob[2].toString());
        this.amount=Double.valueOf(ob[3].toString());
        this.qty=Integer.valueOf(ob[4].toString());
        this.typeName=ob[5].toString();
    }


    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class MemberNet {
        private int qty = 0;

        private double amount = 0.0;


    }


}
